package com.kuaiditu.assistant.ui.message;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.kuaiditu.assistant.R;
import com.kuaiditu.assistant.base.BaseActivity;
import com.kuaiditu.assistant.common.Constants;
import com.kuaiditu.assistant.view.topbar.TopBar;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

@Route(path = MessageActivity.PATH,extras = Constants.NEED_LOGIN_EXTRA)
public class MessageActivity extends BaseActivity {

    public static final String PATH = "/user/msg";


    MessageAdapter mMessageAdapter;
    @BindView(R.id.top_bar)
    TopBar topBar;
    @BindView(R.id.rv_msg)
    RecyclerView rvMsg;


    List<String> msgs = new ArrayList<>();

    @Override
    public int initContentView() {
        return R.layout.activity_message;
    }

    @Override
    public void initInjector() {
//        for (int i = 0; i < 30; i++) {
//            msgs.add("");
//        }
    }

    @Override
    public void initUiAndListener() {
        ButterKnife.bind(this);

        topBar.bind(this, true);
        rvMsg.setLayoutManager(new LinearLayoutManager(mContext));
        rvMsg.setAdapter(mMessageAdapter = new MessageAdapter(msgs));


    }

}
